<?php

/**
 * @package		Joomla
 * @subpackage	wbfirst
 * @copyright	2008 Wim Bekker, www.wimbekker.com.
 * @license		GNU/GPL
*/
 
// no direct access
//defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

//classname'View'viewname 
class WbfirstViewJsSandbox extends JView
{
  function display($tpl = null)
  {
    global $mainframe, $option;
    
    $params = &$mainframe->getParams();
		$this->assignRef('params'  , $params);
    
    $page_title = htmlspecialchars_decode($mainframe->getCfg('sitename')) . ' - javascript sandbox';
     
    $document =& JFactory::getDocument();
    $document->setTitle($page_title);
    
//    JHTML::script('mootools-1.2-core.js', 'components/com_wbfirst/js/');
//    JHTML::script('mootools-1.2-more.js', 'components/com_wbfirst/js/');
    JHTML::script('com_wbfirst.js', 'components/com_wbfirst/js/');
    JHTML::stylesheet('com_wbfirst.css', 'components/com_wbfirst/css/');
    
    $height = $this->params->get('height');
    $width = $this->params->get('width');
    $document->addStyleDeclaration('.container { height:' . $height . '; width: ' . $width . ';}');
    
    $droptop = $height - 150;
    $document->addStyleDeclaration('.drop { top:' . $droptop . 'px;}');
    

    $model =& $this->getModel();
    $greeting = $model->getGreeting();    
    $this->assignRef( 'greetingXYZ', $greeting );
    
    parent::display($tpl);
  }
}

?>
